package com.scs.application.modules.fsd.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.SimpleDataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "智能柜操作记录表")
@TableName("fsd_record")
@EntityIndexAnnotation(ix={"station_code, rfid", "user_id"})
public class FsdRecord extends SimpleDataEntity {

    @EntityFieldAnnotation(
            text = "站点编号",
            length = "30",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String stationCode;

    @EntityFieldAnnotation(
            text = "用户Id",
            length = "30",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String userId;

    @EntityFieldAnnotation(
            text = "操作类型，1：放入，0：取出",
            type = EntityFieldType.INT,
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Integer changeType;

    @EntityFieldAnnotation(
            text = "操作时间",
            type = EntityFieldType.DATETIME,
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String changeTime;

    @EntityFieldAnnotation(
            text = "rfid",
            length = "50",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String rfid;
}
